#include<stdio.h>
#include<string.h>
int main()
{
    char s[100];
    while(1)
    {
        int i;
        gets(s);
        if(strlen(s)==1&&s[0]=='!')
        break;
        for(i=0;i<strlen(s);i++)
        {
            if(s[i]>='a'&&s[i]<='z')
            {
                char x='z'-s[i];     
                s[i]='a'+x;
            }
            if(s[i]>='A'&&s[i]<='Z')
            {
                char x='Z'-s[i];     
                s[i]='A'+x;
            }
        }
        puts(s);
    }
    return 0;
}